<div class="span-22 title">
    All Links(<%= link_to_function 'New', '$("#new_link").toggle()' %>)
</div>

<div id="new_link" style="display:none">
    <% form_for(@site_link, :url => admin_site_links_path) do |f| %>

    <p>
        <%= f.label :title %><br />
        <%= f.text_field :title %>
    </p>

    <p>
        <%= f.label :url %><br />
        <%= f.text_field :url %>
    </p>

    <p>
        <%= f.submit "Create" %>
    </p>
    <% end %>
</div>

<div class="span-22 body">
    <div class="span-17">Link Title</div>
    <div class="span-4">Action</div>
	
    <% @site_links.each do |site_link| %>
        <div class="span-17"><%= site_link.title %></div>
        <div class="span-4">
			<%= link_to "Edit", edit_admin_site_link_path(site_link) %> |
			<%= link_to "Delete", admin_site_link_path(site_link), :method => 'delete', :confirm => 'Are you sure you want to delete this language?' %>
		</div>        
    <% end %>
</div>
